import PyPDF2

file1 = open("Python标准库示例.pdf", 'rb')
file2 = open("信息化需求讨论会-会议卡.pdf", 'rb')
file3 = open("combinedminutes.pdf", 'wb')
waterMarkFile = open("watermark.pdf", 'rb')

pdfReader1 = PyPDF2.PdfReader(file1)
pdfreader2 = PyPDF2.PdfReader(file2)
watermarkReader = PyPDF2.PdfReader(waterMarkFile)
watermarkPage = watermarkReader.pages[0]
pdfwriter = PyPDF2.PdfWriter()
page1 = pdfReader1.pages[4]
page1.merge_page(watermarkPage)
page2 = pdfreader2.pages[0]
page2.merge_page(watermarkPage)

pdfwriter.add_page(page1)
pdfwriter.add_page(page2)
pdfwriter.encrypt("aaa")
pdfwriter.write_stream(file3)

file1.close()
file2.close()
file3.close()
